<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>

<link rel="stylesheet" type="text/css" href="public/view/theme/default/stylesheet/stylesheet.css" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>

<script type="text/javascript" src="public/view/javascript/jquery/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="public/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="public/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="public/view/javascript/jquery/ui/external/jquery.cookie.js"></script>

<!--[if IE]>
<script type="text/javascript" src="public/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4-iefix.js"></script>
<![endif]--> 

<script type="text/javascript" src="public/view/javascript/common.js"></script>

<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="public/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="public/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="public/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php echo $google_analytics; ?>
</head>
<body>

<div id="container" >
<div id=top-header>

      
      
       <?php if (count($languages) > 1) { ?>
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
        <div id="language"><?php echo $text_language; ?> :
          <?php foreach ($languages as $language) { ?>
          &nbsp;<img src="img/flag/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" title="<?php echo $language['name']; ?>" onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>').submit(); $(this).parent().parent().submit();" />
          <?php } ?>
          <input type="hidden" name="language_code" value="" />
          <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
        </div>
      </form>
      <?php } ?>

</div>
<div class=bg_header>
    <div id="header">
      <?php if ($logo) { ?>
      <div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
      <?php } ?>       
    </div>
    
    
    <?php if ($menu) { ?>
    <div id="menu">
      <ul>
        <?php foreach ($menu as $item) { ?>
        <li><a <?php if($item['display']) { echo 'target=_blank';} ?> href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a>
          <?php if ($item['children']) { ?>
          <div>            
            <ul>             
            <?php foreach($item['children'] as $child) { ?>
              <li><a <?php if($child['display']) { echo 'target=_blank'; } ?>  href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li>              
             <?php } ?>
            </ul>            
          </div>
          <?php } ?>
        </li>
        <?php } ?>
      </ul>     
    </div>
    <?php } ?>
</div>
<div id="notification"></div>
